The task of imaging of ultrafast dynamics of a sample with the use of electron microscopy dictates a need to enhance the temporal resolution of the electron microscopy modality. Such enhancement—and, in particular, the increase in temporal resolution of an electron microscope—can be achieved with the use of ultrashort optical laser pulses in what is referred to as “optical gating”, in the process of which a portion of the pulse of free electrons is temporally-filtered or gated as a result of inelastic scattering between the electrons and photons that causes the photon-electron coupling. What results is a portion of the electron pulse with a temporal profile substantially similar to the temporal profile of the gating pulse of light.